package com.tmindtech.api.foodsafe.db

import com.tmindtech.api.foodsafe.model.GpsData
import org.apache.ibatis.annotations.Param
import org.apache.ibatis.annotations.Select
import tk.mybatis.mapper.common.Mapper
import java.util.*

/**
 * Created by RexQian on 2017/11/27.
 */
interface GpsDataMapper : Mapper<GpsData> {
    @Select("SELECT * FROM t_gps_data WHERE enterprise_id = \${enterprise_id} AND upload_date >= #{start_time} AND upload_date < #{end_time}")
    fun selectByCondition(@Param("enterprise_id") enterpriseId: Long,
                          @Param("start_time") startTime: Date,
                          @Param("end_time") endTime: Date): List<GpsData>
}
